<script setup>
import{useRouter,RouterView} from'vue-router'
const router=useRouter()
const gotoUser=()=>{
  router.push('/login')
}
</script>

<template>
  <div class="common-layout">
    <el-container>
      <el-header>
        <img src="../assets/images/logo.svg" alt="">
        <h3>商城后台管理系统</h3>
        <div class="right">
          <a href="#">退出</a>
          <el-dropdown>
          </el-dropdown>
        </div>
      </el-header>
      <el-container>
        <el-aside>
          <el-col>
            <el-menu default-active="1"
            class="el-menu-vertical-demo"
            @open="handleOpen"
            @close="handleClose"
            router>

            <el-menu-item index="/home/index">
            <span>用户管理</span>
            </el-menu-item>
            <el-menu-item index="/home/category">
            <span>权限管理</span>
            </el-menu-item>
            <el-menu-item index="/home/goods">
            <span>商品管理</span>
            </el-menu-item>
            <el-menu-item index="/home/setting">
            <span>订单管理</span>
            </el-menu-item>
            <el-menu-item index="/home/system">
            <span>个人中心</span>
            </el-menu-item>
            </el-menu>
          </el-col>
        </el-aside>
        <el-main>
          <RouterView></RouterView>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<style scoped>
.el-header{
  display:flex;
  height: 10vh;
  line-height: 10vh;
  background-color: rgb(1, 190, 190);
  justify-content: space-between;
}
.el-header h3{
  color: white;
  line-height: 10vh;
  margin-right: 1200px;
}
.el-dropdown{
  margin-top: 4vh;
  border:none;
  outline:none;
  color: white;
}
.el-aside,
.el-main{
  height: 90vh;
}

.el-aside{
  width: 30vh;
}
.el-main{
  background-color: #eee;
}
.el-menu{
  border: none;
}
img{
  width: 50px;
}
a{
  color: white;
}
</style>
